NEXTSTEP for Intel Processors

Title: Booting from an Alternative Hard Disk Drive
Entry Number: 1487
Last Updated: <<Date September 13 1995>>

Procedure Valid for Release: 3.x

Product Vendor:
NeXT Computers, Inc.
900 Chesapeake Dr.
Redwood City, CA 94603
USA

Phone (information): +1 (800) TRY NEXT
Phone (technical support): +1 (800) 955 NEXT
Phone (international): +1 (415) 366 0900

Keywords: boot block, fdisk, partition, SCSI, IDE

Warning

This is an unsupported configuration.  NeXT Technical support will not provide any assistance in configuring your system this way.

Overview

When an Intel computer is powered on, it looks for a device to load software from. The process of finding this software and loading it is known as "booting."

The computer looks for a bootable disk in the floppy drive, the IDE drive, and any attached SCSI drives from lowest to highest SCSI ID, in that order. The computer starts up from the first bootable device it finds. (Note that it is generally possible to disable the IDE drive, in which case the computer will not try to boot from it, using the BIOS configuration of your machine. On some machines it may also be possible to make the BIOS check for fixed disks before looking for a floppy.)

In certain circumstances, you might want to install NEXTSTEP on a SCSI drive, while using the IDE drive for DOS or other operating systems. Or you might want to install NEXTSTEP on a SCSI disk that is not the lowest SCSI ID in the chain. Or perhaps you wish to install NEXTSTEP on the second of two IDE drives. In these cases, additional configuration of your computer needs to be done after installation in order to make it bootable.

This NeXTanswer explains how to configure your system so you can boot NEXTSTEP from a hard disk drive other than the first one encountered during the boot process. The basic procedure consists of creating a small (7 megabyte) NEXTSTEP partition on the primary hard disk drive and then creating some configuration files on this partition which tell NEXTSTEP where to find the necessary boot files. The procedure for booting to the non-primary hard disk drive from the NEXTSTEP boot floppy is also detailed.

Configuration Issues

During installation, it is necessary to have the IDE drive disabled if you wish to install to a SCSI drive. If you have multiple SCSI drives, you must install NEXTSTEP on the drive that is currently configured as device 0. (Note that SCSI device numbers are not the same as SCSI ID numbers. For futher information see NeXTanswer 1109_SCSI_Setup.) Once you have successfully installed NEXTSTEP, boot into NEXTSTEP.

If you are planning on leaving the SCSI drive that NEXTSTEP is installed on configured as device 0, there is no additional configuration that needs to be done; proceed to "Booting from Floppy" below. If however you wish to change the device number of the NEXTSTEP SCSI disk, you must make a change to the fstab file.

Open a shell, and create a backup copy of the fstab file.

localhost> su
localhost# cp /etc/fstab /etc/fstab.orig

Next, using your favorite editor edit the fstab entry such that it reads as follows:

#
#       DO NOT DELETE THIS FILE, IT IS REQUIRED FOR BOOTING
#
#       This file contains information used to mount local hard disks.
#       Consult your Network and System Administration manual
#       for information on adding local disks.  Information on the format
#       of entries in this file can also be found in the fstab man page.
#
/dev/sdna / 4.3 rw,noquota,noauto 0 1

The only change you need to make is to change the n to the device number of your NEXTSTEP SCSI drive. Again, note that SCSI device numbers are not the same as SCSI ID numbers; see NeXTanswer 1109_SCSI_Setup, for further information.

For an IDE drive, the entry should be:

/dev/hd1a / 4.3 rw,noquota,noauto 0 1

Please note the "hd" in this entry. This is what distinguishes a SCSI drive from an IDE drive at the system device level.

Now shutdown your system and reconfigure your hardware so the NEXTSTEP SCSI disk will be assigned the device number you entered above. (If you made a mistake and are unable to configure your hardware properly, you will need to reinstall NEXTSTEP or find a way to boot from another device, so be very careful! If you do need to boot from another device, see NeXTanswer 1468_Upgrading_from_3.1_to_3.2_bug)

Booting from Floppy

One way to boot to NEXTSTEP when it is not installed on the primary hard drive is to first boot from floppy. To do this proceed as follows:

Insert the NEXTSTEP CD-ROM Installation disk in drive A and boot the system.

After some messages the machine will pause while displaying the boot: prompt. Having determined the device number of your SCSI drive (0 if it is the only drive), type the following where n is the device number:

	boot: sd(n)mach_kernel

Note that there are no spaces in the above command.

Your system will boot from the SCSI hard drive.

A second IDE drive can be booted with the following command:

	boot: hd(1)mach_kernel

Booting from Hard Disk Drive

While booting from floppy is effective, it is somewhat annoying. One solution is to create a small NEXTSTEP partition on the primary hard disk (i.e. the disk that gets booted from by default). Because of a bug in the disk command, this partition must be at least 7 megabytes in size. Creating such a partition and configuring it properly allows you to automatically boot into NEXTSTEP without having to enter the sd(n)mach_kernel command. To do so, follow these steps:

Boot NEXTSTEP following the instructions for booting from floppy, above.

Log in as root. (If necessary, set a password for the me account and log out first.)

Start up Terminal.app (located in /NextApps) and use the NEXTSTEP fdisk to create a NEXTSTEP partition on the primary hard disk. You must be root to do this.

For an IDE disk type:

localhost# /usr/etc/fdisk /dev/rhd0h

For a SCSI disk type:

localhost# /usr/etc/fdisk /dev/rsd0h

(For all further instructions, replace hd with sd if you are using a SCSI disk instead of an IDE disk.)

This command puts you in interactive mode; from there create a 7 megabyte NEXTSTEP partition. Save the changes to disk. (Note all of the normal caveats of using fdisk: old information stored on your hard disk drive will be erased, so make sure to back up your files before doing this!)

Use the disk utility to create a NEXTSTEP filesystem on that partition:

localhost# /usr/etc/disk -i /dev/rhd0a

This command also creates the necessary NEXTSTEP boot blocks on the drive. See the UNIX manual page for the disk command for more information.

Next mount the newly created NEXTSTEP partition:

localhost# /usr/etc/mount /dev/hd0a /disk

Copy the minimal system configuration information from the NEXTSTEP filesystem:

localhost# cd /
localhost# tar cf - usr/Devices/System.config | ( cd /disk ; tar xf - )

Finally, edit the system config info file 
	/disk/usr/Devices/System.config/Instance0.table
replacing the line 
	"Kernel"        = "mach_kernel";
with
	"Kernel"        = "sd(n)mach_kernel";

Once again, n is the device number of the SCSI drive with NEXTSTEP installed on it. If you have installed NEXTSTEP onto a second IDE drive, the entry should read:

	"Kernel"        = "hd(1)mach_kernel";

When you reboot your system, it should give you the "n for NEXTSTEP, d for DOS" prompt; typing n makes the machine boot from the SCSI drive with NEXTSTEP installed.

After you're up and running

After you get your system booted, you may want to make changes to your configuration, such as adding a video driver, or a network driver.  Remember that your system always gets its configuration information off of the mini-partition when it boots, but any configuration changes you make with Configure.app reside on the complete NEXTSTEP partition.  After making any changes with Configure.app, you must copy /usr/Devices/System.config back to the mini-partition, and make the same changes to it as shown above.